//
//  CategoryDetailViewCell.m
//  cookBook
//
//  Created by xalo on 16/1/25.
//  Copyright © 2016年 张广斌. All rights reserved.
//

#import "CategoryDetailViewCell.h"
#import "Model.h"

@implementation CategoryDetailViewCell


-(void)setModel:(Model *)model
{
    _model = model;
    if (model.pictureImage == nil) {
        [self.thumb sd_setImageWithURL:[NSURL URLWithString:model.thumb] completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
            model.pictureImage = image;
        }];
    }
    
    self.thumb.image = model.pictureImage;
    self.titleLabel.text = model.title;
    self.yuanliaoLabel.text = model.yuanliao;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
